import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '文章种类',
    align: 'left',
    dataIndex: 'articleType'
  },
  {
    title: '备注',
    align: 'center',
    dataIndex: 'articleBeizhu'
  },
  {
    title: '录入人',
    align: 'center',
    dataIndex: 'articleInsert'
  },
  {
    title: '变更人',
    align: 'center',
    dataIndex: 'articleUpdate'
  },
  {
    title: '变更时间',
    align: 'center',
    dataIndex: 'articleUpdatetime'
  },
  {
    title: '录入时间',
    align: 'center',
    dataIndex: 'articleInserttime'
  },
  {
    title: '是否有效',
    align: 'center',
    dataIndex: 'visible',
    customRender:({text}) => {
       return render.renderSwitch(text, [{text:'是',value:'1'},{text:'否',value:'0'}]);
    },
  },
];

// 高级查询数据
export const superQuerySchema = {
  articleType: {title: '文章种类',order: 0,view: 'text', type: 'string',},
  articleBeizhu: {title: '备注',order: 1,view: 'text', type: 'string',},
  articleInsert: {title: '录入人',order: 2,view: 'text', type: 'string',},
  articleUpdate: {title: '变更人',order: 3,view: 'text', type: 'string',},
  articleUpdatetime: {title: '变更时间',order: 4,view: 'datetime', type: 'string',},
  articleInserttime: {title: '录入时间',order: 5,view: 'datetime', type: 'string',},
  visible: {title: '是否有效',order: 7,view: 'switch', type: 'string',},
};
